package org.example;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {
    private static final Logger logger = LoggerFactory.getLogger(WebConfig.class);

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        String resourceLocation = "file:C:\\Users\\Administrator\\Desktop\\项目\\digital-interviewer-vue\\src\\photo";
        logger.info("Configuring static resource location: {}", resourceLocation);
        registry.addResourceHandler("/**")
                .addResourceLocations(resourceLocation);
    }
}